www.gusucode.com > 帝国网站管理系统(帝国CMS) 6 > 帝国网站管理系统(帝国CMS) 6.5繁体UTF-8/upload/e/admin/ListEnews.php
<?php define('EmpireCMSAdmin','1'); require("../class/connect.php"); require("../class/db_sql.php"); require("../class/functions.php"); $link=db_connect(); $empire=new mysqlquery(); //驗證用戶 $lur=is_login(); $logininid=(int)$lur['userid']; $loginin=$lur['username']; $loginrnd=$lur['rnd']; $loginlevel=$lur['groupid']; $loginadminstyleid=$lur['adminstyleid']; //顯示無限級欄目[管理信息時] function ShowClass_ListNews($adminclass,$doall,$bclassid,$exp){ global $empire,$dbtbpre; $sql=$empire->query("select classid,classname,bclassid,islast,classpath,classurl,listdt,sonclass from {$dbtbpre}enewsclass where bclassid='$bclassid' and wburl='' order by myorder,classid"); if(empty($exp))//js { $exp="|-"; } if(empty($bclassid)) { $bclassid=0; $exp="|-"; } else { $exp=" ".$exp; } $num=$empire->num1($sql); if($num==0&&$bclassid==0)//無記錄 { echo $GLOBALS['notrecordword']; return ""; } $returnstr=""; ?> <table border='0' cellspacing='0' cellpadding='0'> <?php $i=1; while($r=$empire->fetch($sql)) { //需要權限 if(empty($doall)) { if(CheckHaveInClassid($r,$adminclass)==0) { continue; } } //鏈接地址 $classurl=sys_ReturnBqClassUrl($r); //終級欄目 if($r[islast]) { $color=" style='background:#99C4E3'"; //最後一個子欄目 if($i==$num) {$menutype="file1";} else {$menutype="file";} $classname="<a title=' $r[classid] ' onclick='tourl($r[bclassid],$r[classid]);' onmouseout=\"this.style.fontWeight=''\" onmouseover=\"this.style.fontWeight='bold'\" oncontextmenu=\"ShowRightMenu(this,".$r[bclassid].",".$r[classid].",'".$classurl."',1)\">".$r[classname]."</a>"; $onmouseup=""; } else { $color=""; //最後一個大欄目 if($i==$num) { $menutype="menu3"; $listtype="list1"; $onmouseup="chengstate('".$r[classid]."')"; } else { $menutype="menu1"; $listtype="list"; $onmouseup="chengstate('".$r[classid]."')"; } $classname=$r[classname]; $classname="<a title=' $r[classid] ' onmouseout=\"this.style.fontWeight=''\" onmouseover=\"this.style.fontWeight='bold'\" oncontextmenu=\"ShowRightMenu(this,".$r[bclassid].",".$r[classid].",'".$classurl."',0)\">".$r[classname]."</a>"; } ?> <tr> <td id="pr<?=$r[classid]?>" class="<?=$menutype?>" onclick="<?=$onmouseup?>"><?=$classname?></td> </tr> <tr id="item<?=$r[classid]?>" style="display:none"> <td class="<?=$listtype?>"> <?php $jsstr.="<option value='".$r[classid]."'".$color.">".$exp.$r[classname]."</option>"; $jsstr.=ShowClass_ListNews($adminclass,$doall,$r[classid],$exp); ?> </td> </tr> <?php $i+=1; } ?> </table> <?php return $jsstr; } $user_r=$empire->fetch1("select adminclass,groupid from {$dbtbpre}enewsuser where userid='$logininid'"); //用戶組權限 $gr=$empire->fetch1("select doall from {$dbtbpre}enewsgroup where groupid='$user_r[groupid]'"); if($gr['doall']) { $fcfile='../data/fc/ListEnews.php'; } else { $fcfile='../data/fc/ListEnews'.$logininid.'.php'; } if(file_exists($fcfile)&&file_exists('../data/fc/ListEnews.php')) { @include($fcfile); exit(); } //數據表 $changetbs=''; $dh=''; $tbi=0; $tbsql=$empire->query("select tbname,tname from {$dbtbpre}enewstable order by tid"); while($tbr=$empire->fetch($tbsql)) { $tbi++; $changetbs.=$dh.'new ContextItem("'.$tbr['tname'].'",function(){ parent.document.main.location="ListAllInfo.php?tbname='.$tbr['tbname'].'"; })'; if($tbi%3==0) { $changetbs.=',new ContextSeperator()'; } $dh=','; } @ob_start(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>管理信息</title> <link href="../data/menu/menu.css" rel="stylesheet" type="text/css"> <script src="../data/menu/menu.js" type="text/javascript"></script> <script language="javascript" src="../data/rightmenu/context_menu.js"></script> <script language="javascript" src="../data/rightmenu/ieemu.js"></script> <SCRIPT lanuage="JScript"> if(self==top) {self.location.href='admin.php';} function tourl(bclassid,classid){ parent.main.location.href="ListNews.php?bclassid="+bclassid+"&classid="+classid; } if(moz) { extendEventObject(); extendElementModel(); emulateAttachEvent(); } //右鍵菜單 function ShowRightMenu(obj,bclassid,classid,classurl,showmenu) { var eobj,popupoptions if(showmenu==1) { popupoptions = [ new ContextItem("增加信息",function(){ parent.document.main.location="AddNews.php?enews=AddNews&bclassid="+bclassid+"&classid="+classid; }), new ContextItem("刷新欄目",function(){ parent.document.main.location="enews.php?enews=ReListHtml&classid="+classid; }), new ContextItem("刷新欄目JS",function(){ parent.document.main.location="ecmschtml.php?enews=ReSingleJs&doing=0&classid="+classid; }), new ContextItem("刷新首頁",function(){ parent.document.main.location="ecmschtml.php?enews=ReIndex"; }), new ContextItem("數據更新",function(){ parent.document.main.location="ReHtml/ChangeData.php"; }), new ContextSeperator(), new ContextItem("預覽首頁",function(){ window.open("../../"); }), new ContextItem("預覽欄目",function(){ window.open(classurl); }), new ContextSeperator(), new ContextItem("修改欄目",function(){ parent.document.main.location="AddClass.php?classid="+classid+"&enews=EditClass"; }), new ContextItem("增加新欄目",function(){ parent.document.main.location="AddClass.php?enews=AddClass"; }), new ContextItem("複製欄目",function(){ parent.document.main.location="AddClass.php?classid="+classid+"&enews=AddClass&docopy=1"; }), new ContextItem("增加採集節點",function(){ parent.document.main.location="AddInfoClass.php?enews=AddInfoClass&newsclassid="+classid; }), new ContextItem("管理附件",function(){ parent.document.main.location="file/ListFile.php?type=9&classid="+classid; }) ] } else if(showmenu==2) { popupoptions = [ <?=$changetbs?> ] } else { popupoptions = [ new ContextItem("刷新欄目",function(){ parent.document.main.location="enews.php?enews=ReListHtml&classid="+classid; }), new ContextItem("刷新欄目JS",function(){ parent.document.main.location="ecmschtml.php?enews=ReSingleJs&doing=0&classid="+classid; }), new ContextItem("刷新首頁",function(){ parent.document.main.location="ecmschtml.php?enews=ReIndex"; }), new ContextItem("數據更新",function(){ parent.document.main.location="ReHtml/ChangeData.php"; }), new ContextSeperator(), new ContextItem("預覽首頁",function(){ window.open("../../"); }), new ContextItem("預覽欄目",function(){ window.open(classurl); }), new ContextSeperator(), new ContextItem("修改欄目",function(){ parent.document.main.location="AddClass.php?classid="+classid+"&enews=EditClass"; }), new ContextItem("增加新欄目",function(){ parent.document.main.location="AddClass.php?enews=AddClass"; }), new ContextItem("複製欄目",function(){ parent.document.main.location="AddClass.php?classid="+classid+"&enews=AddClass&docopy=1"; }) ] } ContextMenu.display(popupoptions) } </SCRIPT> </head> <body onLoad="initialize();ContextMenu.intializeContextMenu();" bgcolor="#FFCFAD"> <table border='0' cellspacing='0' cellpadding='0'> <tr height=20> <td id="home"><img src="../data/images/homepage.gif" border=0></td> <td><a href="#ecms" onclick="parent.main.location.href='ListAllInfo.php';" onmouseout="this.style.fontWeight=''" onmouseover="this.style.fontWeight='bold'" oncontextmenu="ShowRightMenu(this,0,0,'',2)">管理信息</a></td> </tr> </table> <?php $notrecordword="您還未添加欄目,<br><a href='AddClass.php?enews=AddClass' target='main'><u><b>點擊這裡</b></u></a>進行添加操作"; $jsstr=ShowClass_ListNews($user_r[adminclass],$gr[doall],0,''); if($gr['doall']) { $jsfile="../data/fc/cmsclass.js"; $search_jsfile="../data/fc/searchclass.js"; $search_jsstr=str_replace(" style='background:#99C4E3'","",$jsstr); WriteFiletext_n($jsfile,"document.write(\"".addslashes($jsstr)."\");"); WriteFiletext_n($search_jsfile,"document.write(\"".addslashes($search_jsstr)."\");"); } ?> </body> </html> <?php db_close(); $empire=null; if($gr['doall']||file_exists('../data/fc/ListEnews.php')) { $string=@ob_get_contents(); WriteFiletext($fcfile,AddCheckViewTempCode().$string); } ?>